<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>后台管理</title>
    <!--百度统计-->
    <script src="/blog/js/statistics.js"></script>
    <!--layUI的css-->
    <link rel="stylesheet" href="/layui/css/layui.css">
    <!--layUI的js-->
    <script src="/layui/layui.js"></script>
    <script>
        layui.use(['layer'], function () {
            layer.load(1, {shade: [0.8, "#cccccc"]});
        })
    </script>
</head>
<body>
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo layui-bg-black layui-hide howInLeft a-time005">博客管理</div>
        <!-- 头部区域（可配合layui 已有的水平导航） -->
        <ul class="layui-nav layui-layout-left" style="left:0">
            <!-- 菜单选项-->
            <li class="layui-nav-item layui-show-sm-inline-block" lay-header-event="menuLeft">
                <i id="i_menu" class="layui-icon layui-icon-spread-left"></i>
            </li>
            <!--返回选项-->
            <li class="layui-nav-item"><a href="javascript:void(0);"
                                          onclick="window.history.back()">
                <i class="layui-icon layui-icon-return"></i></a></li>
            <!--返回博客选项-->
            <li id="li_blog_index" class="layui-nav-item"><a href="/index.html">
                <i class="layui-icon layui-icon-transfer"></i></a></li>


            <!--<li class="layui-nav-item layui-hide-xs"><a href="">nav 1</a></li>
            <li class="layui-nav-item layui-hide-xs"><a href="">nav 2</a></li>
            <li class="layui-nav-item layui-hide-xs"><a href="">nav 3</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;">nav groups</a>
                <dl class="layui-nav-child">
                    <dd><a href="">menu 11</a></dd>
                    <dd><a href="">menu 22</a></dd>
                    <dd><a href="">menu 33</a></dd>
                </dl>
            </li>-->
        </ul>
        <ul class="layui-nav layui-layout-right layui-bg-cyan">
            <li id="li_userInfo" class="layui-nav-item layui-hide">
                <a href="javascript:void(0);">
                    <img id="img_head_portrait_url" alt="" src="" class="layui-nav-img">
                    <span id="span_username">未登录</span>
                </a>
                <dl class="layui-nav-child">
                    <dd><a id="user_info_btn" href="javascript:void(0);">
                        <i class="layui-icon layui-icon-list"></i>个人信息</a></dd>
                    <dd><a id="userInfoEditBtn" href="javascript:void(0);">
                        <i class="layui-icon layui-icon-edit"></i>修改信息</a></dd>
                    <dd><a href="/blog/index.html" target="_blank" rel="noopener">
                        <i class="layui-icon layui-icon-home"></i>返回博客</a></dd>
                    <dd><a id="logout_btn" href="javascript:void(0);">
                        <i class="layui-icon layui-icon-logout"></i>退出</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item" lay-header-event="menuRight" lay-unselect>
                <a href="javascript:void(0);">
                    <i class="layui-icon layui-icon-more-vertical"></i>
                </a>
            </li>
        </ul>
    </div>

    <div class="layui-side layui-bg-black layui-hide showInLeft a-time005">
        <div class="layui-side-scroll">

            <!-- 左侧导航区域（可配合layui已有的垂直导航） settings-->
            <ul id="ul_left" hidden class="layui-nav layui-nav-tree" lay-filter="test">
                <li class="layui-nav-item"><a href="/settings/index.html" target="iframe_a" rel="noopener">
                    <i class="layui-icon layui-icon-home"></i>
                    首页
                    <button id="index_btn" hidden></button>
                </a></li>

                <li class="layui-nav-item  layui-nav-itemed">
                    <a class="" href="javascript:void(0);">
                        <i class="layui-icon layui-icon-time"></i>博客管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="/settings/add_blog.html" onclick="$('#blog_edit_flag').val(false)"
                               target="iframe_a" rel="noopener">
                            <i class="layui-icon layui-icon-component"></i>
                            发布博客</a>
                        </dd>
                        <dd><a href="/settings/blog_list.html" target="iframe_a" rel="noopener">
                            <i class="layui-icon layui-icon-form"></i>
                            博客列表</a>
                        </dd>
                        <dd><a href="/settings/blog_drafts.html" target="iframe_a" rel="noopener">
                            <i class="layui-icon layui-icon-list"></i>
                            草稿箱</a>
                        </dd>
                        <dd><a href="/settings/blog_recycle.html" target="iframe_a" rel="noopener">
                            <i class="layui-icon layui-icon-delete"></i>
                            回收站</a>
                        </dd>
                    </dl>
                </li>

                <li title="root_to_see" class="layui-nav-item">
                    <a class="" href="javascript:void(0);">
                        <i class="layui-icon layui-icon-senior"></i>分类标签管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="/settings/type.html" target="iframe_a" rel="noopener">
                            <i class="layui-icon layui-icon-diamond"></i>
                            分类管理</a></dd>
                        <dd><a href="/settings/tag.html" target="iframe_a" rel="noopener">
                            <i class="layui-icon layui-icon-note"></i>
                            标签管理</a></dd>
                    </dl>
                </li>
                <li title="root_to_see" class="layui-nav-item">
                    <a class="" href="javascript:void(0);">
                        <i class="layui-icon layui-icon-chart"></i>统计图表</a>
                    <dl class="layui-nav-child">
                        <dd><a href="/settings/echarts/mainMealEcharts.html" target="iframe_a" rel="noopener">
                            <i class="layui-icon layui-icon-find-fill"></i>未完善图表</a>
                        </dd>
                        <dd><a href="/settings/echarts/broadBandEcharts.html" target="iframe_a"
                               rel="noopener"><i class="layui-icon layui-icon-wifi"></i>未完善图表</a></dd>
                    </dl>
                </li>
                <li title="root_to_see" class="layui-nav-item">
                    <a href="/settings/user.html" target="iframe_a" rel="noopener">
                        <i class="layui-icon layui-icon-user"></i>用户管理</a>
                </li>
                <li title="root_to_see" class="layui-nav-item">
                    <a href="/settings/role.html" target="iframe_a" rel="noopener">
                        <i class="layui-icon layui-icon-group"></i>角色管理</a>
                </li>
                <li title="root_to_see" class="layui-nav-item">
                    <a href="/settings/dic.html" target="iframe_a" rel="noopener">
                        <i class="layui-icon layui-icon-cols"></i>数据字典</a>
                </li>
                <li class="layui-nav-item showLeft a-time1 a-delay1">
                    <img style="width: 5em;height: auto" src="https://z3.ax1x.com/2021/08/31/hUava4.gif" alt="">
                </li>

            </ul>
        </div>
    </div>

    <div class="layui-body" style="left: 0;padding: 0;margin: 0">
        <!-- 内容主体区域 -->
        <!--        <div style="padding: 15px;">内容主体区域。记得修改 layui.css 和 js 的路径</div>-->

        <iframe class="layui-iframe" name="iframe_a" style="width: 100%;height: 100%;padding: 0;margin: 0"></iframe>
    </div>

    <div class="layui-footer layui-hide" style="left:0">
        <div id="progress" class="layui-progress" lay-filter="myProgress">
            <div class="layui-progress-bar layui-bg-cyan" lay-percent="0%"></div>
        </div>
        <!-- 底部固定区域 -->
        目前属于开发阶段，发现的bug请说明
    </div>
</div>


<!--隐藏域：放一些需要保存的值-->
<!--此隐藏域保存跳转到add_blog.html页面的时候，是否是修改博客-->
<input type="hidden" id="blog_edit_flag" value="false">
<input type="hidden" id="blog_id" value="">
<input type="hidden" id="blog_published" value="true">

</body>
</html>

<!--个人信息的layer-->
<form id="userInfoLayer" class="layui-form layui-form-pane" style="display: none">
    <div class="layui-form-item">
        <label class="layui-form-label">
            <i class="layui-icon layui-icon-cellphone"></i>phone</label>
        <div class="layui-input-block">
            <input type="text" disabled name="phone" required lay-verify="phone" placeholder="phone"
                   autocomplete="off"
                   class="layui-input" value="15082687458">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">
            <i class="layui-icon layui-icon-username"></i>用户名</label>
        <div class="layui-input-block">
            <input type="text" disabled name="username" required lay-verify="required" placeholder="username"
                   autocomplete="off"
                   class="layui-input" value="username">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">
            <i class="layui-icon layui-icon-user"></i>角色名</label>
        <div class="layui-input-block">
            <input type="text" disabled name="role_name" required lay-verify="required" placeholder="roleName"
                   autocomplete="off"
                   class="layui-input" value="role_name">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">
            <i class="layui-icon layui-icon-location"></i>地址</label>
        <div class="layui-input-block">
            <input type="text" disabled name="address" required lay-verify="required" placeholder="address"
                   autocomplete="off"
                   class="layui-input" value="成都">
        </div>
    </div>

    <div class="layui-form-item" pane>
        <label class="layui-form-label">
            <i class="layui-icon layui-icon-male"></i>
            性别
            <i class="layui-icon layui-icon-female"></i>
        </label>
        <div class="layui-input-block">
            <input type="radio" name="sex" value="男" title="男">
            <input type="radio" name="sex" value="女" title="女">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">
            <i class="layui-icon layui-icon-email"></i>邮箱</label>
        <div class="layui-input-block">
            <input type="text" disabled name="email" required lay-verify="email" placeholder="email"
                   autocomplete="off"
                   class="layui-input" value="1234567890@qq.com">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">
            <i class="layui-icon layui-icon-email"></i>头像url</label>
        <div class="layui-input-block">
            <input type="text" disabled name="head_portrait_url" required lay-verify="url" placeholder="url"
                   autocomplete="off"
                   class="layui-input" value="https://picsum.photos/id/140/100/100">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">发布博客</label>
        <div class="layui-input-block">
            <input type="text" disabled name="blog_number" autocomplete="off" class="layui-input" value="100">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">发布评论</label>
        <div class="layui-input-block">
            <input type="text" disabled name="comment_number" autocomplete="off" class="layui-input" value="100">
        </div>
    </div>

    <div class="layui-form-item" hidden id="submitBtnDiv">
        <div class="layui-input-block" style="text-align: right">
            <button class="layui-btn" lay-submit lay-filter="formSubmit">更新</button>
            <button class="layui-btn layui-btn-primary" id="cancelBtn">取消</button>
        </div>
    </div>
</form>

<script>
    //JS
    layui.use(['layer', 'util'], function () {
        let layer = layui.layer
            , util = layui.util
            , $ = layui.$;

        //头部事件
        util.event('lay-header-event', {
            //左侧菜单事件
            menuLeft: function (othis) {
                let $i = $('#i_menu');
                if ($i.hasClass('layui-icon-spread-left')) {
                    $i.removeClass('layui-icon-spread-left').addClass('layui-icon-shrink-right');
                    $('.layui-layout-left').css('left', '200px');
                    $('.layui-body').css('left', '200px');
                    $('.layui-footer').css('left', '200px');
                    $('.layui-logo').removeClass('layui-hide');
                    $('.layui-side').removeClass('layui-hide');
                    $('.layui-footer').removeClass("layui-hide");
                } else {
                    $i.removeClass('layui-icon-shrink-right').addClass('layui-icon-spread-left');
                    $('.layui-logo').addClass('layui-hide');
                    $('.layui-side').addClass('layui-hide');
                    $('.layui-footer').addClass("layui-hide");
                    $('.layui-layout-left').css('left', '0');
                    $('.layui-body').css('left', '0');
                    $('.layui-footer').css('left', '0');
                }
            }
            , menuRight: function () {
                let $li = $("#li_userInfo");
                if ($li.hasClass("layui-hide")) {
                    $li.removeClass("layui-hide");
                } else
                    $li.addClass("layui-hide");
            }
        });
        // 博客首页按钮hover事件
        $("#li_blog_index").hover(function () {
            layer.tips('返回博客首页', this, {tips: 3});
        }, function () {
            layer.closeAll("tips");
        });

    });
</script>
<!--jQuery-->
<script src="/jquery-3.6.0.min.js"></script>
<!--引入自己的js-->
<script src="/settings/js/menu.js"></script>
<!--animate 的css-->
<link rel="stylesheet" type="text/css" href="/lib/animate/css/reset.css"/>
<link rel="stylesheet" type="text/css" href="/lib/animate/css/animate.css"/>

